package itheima.edu.info.Exdents.Inface;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Shoee01 {
    public static void main(String[] args) throws ParseException {
        Date a =new Date();
        System.out.println(a.getTime());
        long time = System.currentTimeMillis();
        a.setTime(time);
        System.out.println(a);
        SimpleDateFormat stf=new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
        String s =stf.format(a);
        System.out.println(s);
        System.out.println("-------------------");
        String b ="2019-11-22 12:23:43";
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date eb=sdf.parse(b);
        System.out.println(eb);

    }
}
